﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='budget_insert' and s.name='Budget')
DROP PROCEDURE [Budget].budget_insert
GO
CREATE PROCEDURE [Budget].budget_insert 
@PK uniqueidentifier, 
@MainBudgetID uniqueidentifier, 
@Name nvarchar(100), 
@Start date, 
@End date, 
@Comment nvarchar(500), 
@LastVersion bit, 
@Validated bit
AS
BEGIN
INSERT INTO [Budget].[Budgets]
([id_budget], [id_main_budget], [name], [start], [end], [comment], [last_version], [validated])
VALUES (@PK,@MainBudgetID,@Name,@Start,@End,@Comment,@LastVersion,@Validated)
END